#ifndef TEST_GRAPHICS_TEST_BASIC_LIGHTING_H
#	define TEST_GRAPHICS_TEST_BASIC_LIGHTING_H

#include "rendertest.h"
#include "inputs/command.h"
#include "system/timer.h"

namespace test {
	namespace graffiti {

class BasicLighting
:	public dw::test::RenderTest
{
public : //! @name Types definitions
	//! @{
	typedef dw::test::RenderTest base;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	BasicLighting()
	:	base("BasicLighting")
	,	m_triCubeIndexBuffer(NULL)
	,	m_triCubeVertexBuffer(NULL)
	,	m_icoIndexBuffer(NULL)
	,	m_icoVertexBuffer(NULL)
	,	m_objectRot(0.0f)
	,	m_rotate(false)
	,	m_lightingMode(0)
	{
		;
	}

	virtual ~BasicLighting()
	{
		;
	}
	//! @}

public : //! @name Commands
	//! @{
	virtual bool setup(dw::graffiti::RenderWindow* renderWindow);
	virtual bool render();
	virtual bool teardown();
	//! @}

private : //! @name Internal commands
	//! @{
	bool initPrograms();
	bool initTriCube();
	bool initIco();
	//! @}

private : //! @name Data
	//! @{
	static const dw::uint32 ProgramsCount = 3;

	dw::inputs::InputCommand m_switchLighting;
	dw::inputs::InputCommand m_toggleRotation;
	dw::inputs::InputCommand m_reloadPrograms;

	dw::graffiti::Program* m_programLighting[ProgramsCount];

	dw::graffiti::IndexBuffer* m_triCubeIndexBuffer;
	dw::graffiti::VertexBuffer* m_triCubeVertexBuffer;

	dw::graffiti::IndexBuffer* m_icoIndexBuffer;
	dw::graffiti::VertexBuffer* m_icoVertexBuffer;

	bool m_rotate;
	dw::uint32 m_lightingMode;
	dw::float32 m_objectRot;
	dw::system::Timer m_timer;
	//! @}
};

	} // namespace graffiti
} // namespace test

#endif // !TEST_GRAPHICS_TEST_BASIC_LIGHTING_H
